package cn.zjj.feign;

import cn.zjj.domain.MovieTicket;
import cn.zjj.dto.UserTicketDto;
import cn.zjj.fallback.MovieFallBackFactory;
import cn.zjj.result.JsonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "service-movie",fallbackFactory = MovieFallBackFactory.class)
@RequestMapping("/movieticket")
public interface MovieFeignClient {

    @GetMapping("/select")
    JsonResult select();
    //观影
    @PostMapping("/selectUserTicket")
    JsonResult selectUserTicket(@RequestBody UserTicketDto userTicketDto);
    //根据电影票id查
    @GetMapping("/selectById/{id}")
    JsonResult selectById(@PathVariable("id") Long id);
    //购票
    @PostMapping("/buyTicket")
    JsonResult buyTicket(@RequestBody UserTicketDto buyTicketDto);

    @GetMapping("/getAllId")
    JsonResult getAllId();
}
